```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Redis vs Memcached | 内存缓存系统深度对比</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Hiragino Sans GB", Simsun, sans-serif;
            background-color: #f8f9fa;
            color: #333;
            line-height: 1.6;
        }
        .hero {
            background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
            color: white;
        }
        .section-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.05);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .section-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 35px rgba(0,0,0,0.1);
        }
        .feature-icon {
            font-size: 1.75rem;
            margin-bottom: 1rem;
            color: #2575fc;
        }
        .comparison-badge {
            font-weight: 500;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
        }
        .redis-badge {
            background-color: #ff4757;
            color: white;
        }
        .memcached-badge {
            background-color: #3498db;
            color: white;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 700;
        }
        .drop-cap:first-letter {
            float: left;
            font-size: 4.5rem;
            line-height: 0.7;
            margin-right: 1rem;
            margin-bottom: 0.5rem;
            color: #6a11cb;
            font-weight: 700;
        }
    </style>
</head>
<body class="antialiased">
    <!-- Hero Section -->
    <section class="hero py-20 px-4 md:py-32">
        <div class="max-w-6xl mx-auto text-center">
            <h1 class="text-4xl md:text-6xl font-bold mb-6 animate-fade-in">Redis vs Memcached</h1>
            <p class="text-xl md:text-2xl opacity-90 mb-8 max-w-3xl mx-auto">深入解析两大内存缓存系统的核心差异</p>
            <div class="flex justify-center space-x-4">
                <span class="comparison-badge redis-badge">Redis</span>
                <span class="comparison-badge memcached-badge">Memcached</span>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="max-w-6xl mx-auto px-4 py-12">
        <!-- Introduction -->
        <section class="mb-20">
            <div class="section-card p-8">
                <p class="drop-cap text-lg md:text-xl text-gray-700">Redis 和 Memcached 是两种流行的内存缓存系统，它们都广泛用于提高应用程序的性能，但它们在设计、功能和用途上存在一些关键差异。本指南将深入分析它们的核心区别，帮助您为项目选择最合适的解决方案。</p>
            </div>
        </section>

        <!-- Comparison Table -->
        <section class="mb-20">
            <h2 class="text-3xl font-bold mb-8 text-center">核心特性对比</h2>
            <div class="section-card overflow-hidden">
                <div class="grid grid-cols-1 md:grid-cols-3 divide-y md:divide-y-0 md:divide-x divide-gray-100">
                    <div class="p-6">
                        <h3 class="text-xl font-bold mb-4 flex items-center">
                            <i class="fas fa-layer-group feature-icon mr-3"></i>
                            对比维度
                        </h3>
                        <ul class="space-y-4">
                            <li class="font-medium py-2">基本概念</li>
                            <li class="font-medium py-2">数据存储和结构</li>
                            <li class="font-medium py-2">持久化</li>
                            <li class="font-medium py-2">数据一致性和失效</li>
                            <li class="font-medium py-2">分布式特性</li>
                            <li class="font-medium py-2">性能</li>
                            <li class="font-medium py-2">内存使用</li>
                            <li class="font-medium py-2">使用场景</li>
                        </ul>
                    </div>
                    <div class="p-6 bg-red-50">
                        <h3 class="text-xl font-bold mb-4 flex items-center">
                            <i class="fab fa-reddit-alien feature-icon mr-3" style="color: #ff4757;"></i>
                            Redis
                        </h3>
                        <ul class="space-y-4">
                            <li>内存数据结构存储系统，支持多种角色</li>
                            <li>支持多种复杂数据结构</li>
                            <li>支持RDB和AOF两种持久化方式</li>
                            <li>支持事务和键过期策略</li>
                            <li>内置集群模式和支持复制</li>
                            <li>性能良好，复杂操作略慢</li>
                            <li>高级内存管理策略</li>
                            <li>实时分析、会话存储等</li>
                        </ul>
                    </div>
                    <div class="p-6 bg-blue-50">
                        <h3 class="text-xl font-bold mb-4 flex items-center">
                            <i class="fas fa-bolt feature-icon mr-3" style="color: #3498db;"></i>
                            Memcached
                        </h3>
                        <ul class="space-y-4">
                            <li>高性能分布式内存对象缓存系统</li>
                            <li>仅支持键值对存储</li>
                            <li>不支持持久化</li>
                            <li>支持键过期但不支持事务</li>
                            <li>客户端分片，无内置高可用</li>
                            <li>简单操作性能更高</li>
                            <li>内存管理相对简单</li>
                            <li>简单缓存需求</li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Feature Details -->
        <section class="mb-20">
            <h2 class="text-3xl font-bold mb-8 text-center">核心差异详解</h2>
            
            <!-- 1. Basic Concept -->
            <div class="section-card p-8 mb-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">1.</span>
                    基本概念
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>Redis 是一个开源的内存数据结构存储系统，可以用作数据库、缓存和消息代理。支持丰富的数据结构，包括字符串、哈希、列表、集合、有序集合、位图、HyperLogLog 和地理空间索引。</p>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>Memcached 是一个高性能的分布式内存对象缓存系统，主要用于加速动态 Web 应用程序通过缓存数据库查询结果、API 调用和页面生成等。主要以键值对的形式存储数据，支持简单的字符串值和二进制数据。</p>
                    </div>
                </div>
            </div>

            <!-- 2. Data Storage -->
            <div class="section-card p-8 mb-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">2.</span>
                    数据存储和结构
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>支持多种数据结构，如字符串、哈希、列表、集合、有序集合、位图、HyperLogLog 和地理空间数据。提供丰富的操作命令，可以对数据进行复杂的查询和操作，如排序、聚合和计算。</p>
                        <div class="mt-4">
                            <div class="mermaid">
                                graph TD
                                    A[Redis] --> B[字符串]
                                    A --> C[哈希]
                                    A --> D[列表]
                                    A --> E[集合]
                                    A --> F[有序集合]
                                    A --> G[位图]
                                    A --> H[HyperLogLog]
                                    A --> I[地理空间索引]
                            </div>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>主要以键值对的形式存储数据，数据结构非常简单。只支持字符串值和二进制数据，无法对数据进行复杂的操作。</p>
                        <div class="mt-4">
                            <div class="mermaid">
                                graph TD
                                    A[Memcached] --> B[键值对]
                                    B --> C[字符串]
                                    B --> D[二进制数据]
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 3. Persistence -->
            <div class="section-card p-8 mb-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">3.</span>
                    持久化
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>支持持久化，将内存中的数据保存到磁盘，以防数据丢失。提供两种持久化方式：RDB（快照）和 AOF（追加文件）。可以根据需要选择启用其中一种或两者。</p>
                        <div class="mt-4 flex space-x-4">
                            <div class="bg-white p-3 rounded-lg shadow-sm">
                                <div class="font-bold text-sm">RDB</div>
                                <div class="text-xs">定时快照</div>
                            </div>
                            <div class="bg-white p-3 rounded-lg shadow-sm">
                                <div class="font-bold text-sm">AOF</div>
                                <div class="text-xs">追加日志</div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>不支持持久化。所有存储的数据仅保存在内存中，服务器重启后数据会丢失。</p>
                        <div class="mt-4">
                            <div class="bg-white p-4 rounded-lg shadow-sm text-center">
                                <i class="fas fa-exclamation-triangle text-yellow-500 text-2xl mb-2"></i>
                                <div class="font-bold">无持久化支持</div>
                                <div class="text-xs">服务器重启后数据丢失</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 4. Data Consistency -->
            <div class="section-card p-8 mb-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">4.</span>
                    数据一致性和失效
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>提供事务功能，可以通过 MULTI/EXEC 命令支持事务操作。支持键的过期策略，可以设置键的过期时间，自动清理过期数据。</p>
                        <div class="mt-4">
                            <pre class="bg-white p-3 rounded-lg text-sm overflow-x-auto">
<code>MULTI
SET key1 "value1"
EXPIRE key1 3600
SET key2 "value2"
EXEC</code></pre>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>不支持事务操作。支持键的过期策略，可以设置键的过期时间，过期后自动清理。</p>
                        <div class="mt-4">
                            <pre class="bg-white p-3 rounded-lg text-sm overflow-x-auto">
<code>set key 0 3600 5
value</code></pre>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 5. Distributed Features -->
            <div class="section-card p-8 mb-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">5.</span>
                    分布式特性
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>支持集群模式，通过 Redis Cluster 可以实现数据的分片和高可用性。还支持主从复制、哨兵模式以及 Redis Sentinel 进行高可用性管理。</p>
                        <div class="mt-4">
                            <div class="mermaid">
                                graph LR
                                    A[Redis Cluster] --> B[节点1]
                                    A --> C[节点2]
                                    A --> D[节点3]
                                    B --> E[主节点]
                                    B --> F[从节点]
                            </div>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>支持分布式缓存，通常通过客户端分片机制实现数据分片。不提供内置的高可用性或复制机制，需要额外的工具和配置来实现高可用性。</p>
                        <div class="mt-4">
                            <div class="mermaid">
                                graph LR
                                    A[客户端] --> B[Memcached 节点1]
                                    A --> C[Memcached 节点2]
                                    A --> D[Memcached 节点3]
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 6. Performance -->
            <div class="section-card p-8 mb-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">6.</span>
                    性能
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>虽然 Redis 在大多数操作中比 Memcached 稍慢，但它的丰富数据结构和持久化功能提供了更多的灵活性和功能。性能上通常表现良好，特别是在需要复杂数据操作的场景中。</p>
                        <div class="mt-4">
                            <div class="bg-white p-4 rounded-lg shadow-sm">
                                <div class="flex justify-between mb-2">
                                    <span class="text-sm font-medium">简单操作</span>
                                    <span class="text-sm font-medium">80%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2.5">
                                    <div class="bg-red-500 h-2.5 rounded-full" style="width: 80%"></div>
                                </div>
                                <div class="flex justify-between mt-4 mb-2">
                                    <span class="text-sm font-medium">复杂操作</span>
                                    <span class="text-sm font-medium">95%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2.5">
                                    <div class="bg-red-500 h-2.5 rounded-full" style="width: 95%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>通常在简单的缓存场景下表现出更高的性能，因为它的操作更简单且只支持字符串键值对。性能更适合那些不需要复杂数据结构的缓存需求。</p>
                        <div class="mt-4">
                            <div class="bg-white p-4 rounded-lg shadow-sm">
                                <div class="flex justify-between mb-2">
                                    <span class="text-sm font-medium">简单操作</span>
                                    <span class="text-sm font-medium">95%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2.5">
                                    <div class="bg-blue-500 h-2.5 rounded-full" style="width: 95%"></div>
                                </div>
                                <div class="flex justify-between mt-4 mb-2">
                                    <span class="text-sm font-medium">复杂操作</span>
                                    <span class="text-sm font-medium">不支持</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2.5">
                                    <div class="bg-gray-400 h-2.5 rounded-full" style="width: 0%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 7. Memory Usage -->
            <div class="section-card p-8 mb-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">7.</span>
                    内存使用
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>支持内存优化选项，如内存压缩和对象共享，允许更高效地使用内存。提供了多种内存管理策略，包括 LRU（最近最少使用）和 LFU（最少频繁使用）策略。</p>
                        <div class="mt-4">
                            <div class="flex flex-wrap gap-2">
                                <span class="bg-white px-3 py-1 rounded-full text-sm">LRU</span>
                                <span class="bg-white px-3 py-1 rounded-full text-sm">LFU</span>
                                <span class="bg-white px-3 py-1 rounded-full text-sm">内存压缩</span>
                                <span class="bg-white px-3 py-1 rounded-full text-sm">对象共享</span>
                            </div>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>主要依赖于内存中的数据存储，不提供高级的内存管理策略。内存管理相对简单，但可以通过配置最大内存限制和清理策略来控制内存使用。</p>
                        <div class="mt-4">
                            <div class="flex flex-wrap gap-2">
                                <span class="bg-white px-3 py-1 rounded-full text-sm">简单LRU</span>
                                <span class="bg-white px-3 py-1 rounded-full text-sm">内存限制</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 8. Use Cases -->
            <div class="section-card p-8">
                <h3 class="text-2xl font-bold mb-4 flex items-center">
                    <span class="text-red-500 mr-2">8.</span>
                    使用场景
                </h3>
                <div class="grid md:grid-cols-2 gap-6">
                    <div class="bg-red-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fab fa-reddit-alien mr-2" style="color: #ff4757;"></i>
                            Redis
                        </h4>
                        <p>适用于需要复杂数据结构、高度可用性和持久化的应用场景。常用于实时分析、会话存储、排行榜、队列等场景。</p>
                        <div class="mt-4">
                            <ul class="space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-red-500 mt-1 mr-2"></i>
                                    <span>实时分析系统</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-red-500 mt-1 mr-2"></i>
                                    <span>用户会话存储</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-red-500 mt-1 mr-2"></i>
                                    <span>排行榜和计数</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-red-500 mt-1 mr-2"></i>
                                    <span>消息队列</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="bg-blue-50 p-6 rounded-lg">
                        <h4 class="font-bold text-lg mb-2 flex items-center">
                            <i class="fas fa-bolt mr-2" style="color: #3498db;"></i>
                            Memcached
                        </h4>
                        <p>适用于简单的缓存需求，如缓存数据库查询结果、API 响应或页面渲染结果。常用于需要高性能和简单缓存机制的场景。</p>
                        <div class="mt-4">
                            <ul class="space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-blue-500 mt-1 mr-2"></i>
                                    <span>数据库查询缓存</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-blue-500 mt-1 mr-2"></i>
                                    <span>API响应缓存</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-blue-500 mt-1 mr-2"></i>
                                    <span>页面片段缓存</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle text-blue-500 mt-1 mr-2"></i>
                                    <span>简单对象缓存</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Decision Guide -->
        <section class="mb-20">
            <div class="section-card p-8">
                <h2 class="text-3xl font-bold mb-6 text-center">如何选择？</h2>
                <div class="mermaid">
                    flowchart TD
                        A[需要缓存系统?] --> B{需要复杂数据结构?}
                        B -->|是| C[选择 Redis]
                        B -->|否| D{需要持久化?}
                        D -->|是| C
                        D -->|否| E{需要高可用/集群?}
                        E -->|是| C
                        E -->|否| F[选择 Memcached]
                </div>
                <div class="mt-8 grid md:grid-cols-2 gap-6">
                    <div class="bg-gradient-to-r from-red-100 to-red-50 p-6 rounded-lg">
                        <h3 class="text-xl font-bold mb-4 flex items-center">
                            <i class="fab fa-reddit-alien mr-2 text-red-500"></i>
                            选择 Redis 当
                        </h3>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <i class="fas fa-check text-red-500 mt-1 mr-2"></i>
                                <span>需要存储复杂数据结构</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-red-500 mt-1 mr-2"></i>
                                <span>需要数据持久化</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-red-500 mt-1 mr-2"></i>
                                <span>需要内置高可用性</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-red-500 mt-1 mr-2"></i>
                                <span>需要发布/订阅功能</span>
                            </li>
                        </ul>
                    </div>
                    <div class="bg-gradient-to-r from-blue-100 to-blue-50 p-6 rounded-lg">
                        <h3 class="text-xl font-bold mb-4 flex items-center">
                            <i class="fas fa-bolt mr-2 text-blue-500"></i>
                            选择 Memcached 当
                        </h3>
                        <ul class="space-y-3">
                            <li class="flex items-start">
                                <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                                <span>只需要简单键值存储</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                                <span>追求极致简单操作性能</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                                <span>不需要数据持久化</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                                <span>已有其他高可用方案</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
        
        // 添加卡片悬停效果
        document.querySelectorAll('.section-card').forEach(card => {
            card.addEventListener('mouseenter', function() {
                this.style.boxShadow = '0 15px 35px rgba(0,0,0,0.12)';
            });
            card.addEventListener('mouseleave', function() {
                this.style.boxShadow = '0 8px 30px rgba(0,0,0,0.05)';
            });
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
    </script>
</body>
</html>
```